<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>excutor</title>
</head>
<body>
    <script>
        let P1 = new Promise((resolve, reject) => {
            resolve("success")
        });
        let P2 = Promise.resolve("good");
        let P3 = Promise.resolve("good night");
        let result = Promise.race([P1, P2, P3]);
        console.log(result);
        let P4 = new Promise((resolve, reject) => {
            setTimeout(() => {
                resolve("success");
            }, 1000)
        });
        let P5 = Promise.resolve("good");
        let P6 = Promise.resolve("good night");
        let result2 = Promise.race([P4, P5, P6]);
        console.log(result2);
    </script>
</body>
</html>